<?php
	$date = $getUser['birthdate'];
	list($day,$month,$year) = split('[/.-]',$date);
?>
<table>
	<form action="persDetails_Process.php" method="post">
		<tr><td>Enter your personal details.</td></tr>
		<tr>
			<td>Gender<span style="color: #FF0000;">*</span>:</td>
			<td>
				<input type="hidden" value="<?php echo $getUser['user_id'];?>" name="user_id" id="user_id">
				<?php
					if($getUser['gender']=="Male")
					{
				?>
						<input type="radio" name="gender" id="male" value="Male" checked="checked">Male		
						<input type="radio" name="gender" id="female" value="Female">Female
				<?php
					}
					else
					{
				?>		<input type="radio" name="gender" id="male" value="Male">Male		
						<input type="radio" name="gender" id="female" value="Female" checked="checked">Female
				<?php
					}
				?>
			</td>
		</tr>
		<tr>
			<td>Date of birth:</td>
			<td>
				<select name="dd" id="dd">	
					<option><?php echo $day;?></option>
					<?php
						for($dd=1;$dd!=10;$dd++)
						{	
							if($day!=$dd)
							{	
							echo "<option>0".$dd."</option>";
							}
						}
						for($d=10;$d!=32;$d++)
						{
							if($day!=$d)
							{
							echo "<option>".$d."</option>";
							}
						}
					?>
				</select>
			
				<select name="mm" id="mm">	
					<option><?php echo $month;?></option>
					<?php
						for($m=1;$m!=10;$m++)
						{
							if($month!=$m)
							{
							echo "<option>0".$m."</option>";
							}
						}
						for($n=10;$n!=13;$n++)
						{	
							if($month!=$n)
							{
								echo "<option>".$n."</option>";
							}
						}
					?>
				</select>
				
				<select name="yy" id="yy">	
					<option><?php echo $year;?></option>
					<?php
						for($y=2011;$y!=1899;$y--)
						{
							if($month!=$y)
							{
								echo "<option>".$y."</option>";
							}
						}
					?>
				</select>

			</td>
		</tr>
		<tr>
			<td>Mobile number:</td>
			<td>
				<input type="text" name="stdCode" id="stdCode" size="3">
				<input type="text" name="phNo" id="phNo" size="15">
			</td>
		</tr>
		<tr>
			<td>&nbsp;</td>
			<td><input type="checkbox" name="checkbox" id="checkbox" value=""><span>Display my number to everyone</span></td>
		</tr>
		<tr>
			<td>Location:</td>
			<td>
			<?php 
				$location = mysql_query("select * from users as u, cities as c where u.location=c.city_id and u.user_id=".$_SESSION['user_id']);
				$getLocation=mysql_fetch_array($location);
			?>
				<select name="location" id="location">
					<option><?php echo $getLocation['city_name'];?></option>
					<?php
						$loc = mysql_query("select * from cities");
						while($getLoc = mysql_fetch_array($loc))
						{
					?>
					<option>
						<?php echo $getLoc['city_name'];?>
					</option>
					<?php
						}	
					?>
				</select>
			</td>
		</tr>
		
		<tr>	
			<td>&nbsp;</td>
			<td><input type="submit" name="perDetailsSub" id="perDetailsSub" class="saveButton" value="">
			<input type="reset" name="reset" id="reset" class="resetButton"></td>
		</tr>
	</form>
</table>